<template>
    <div class="container">
        <div class="handle-box">
                <el-form ref="form" :model="form" label-width="90px" class="flex">
                    <!-- <el-form-item label="所属街道：">
                        <el-input v-model="name" placeholder="请输入名称" class="handle-input mr10"></el-input>
                    </el-form-item>
                    <el-form-item label="所属社区：">
                        <el-input v-model="name" placeholder="请输入名称" class="handle-input mr10"></el-input>
                    </el-form-item> -->
                    <el-form-item label="小区：">
                        <el-cascader
                            v-model="villageno"
                            :options="options"
                            :show-all-levels="false"
                            ></el-cascader> 
                    </el-form-item> 
                    
                    <el-form-item label="居民姓名：">
                        <el-input v-model="name" placeholder="请输入名称" class="handle-input mr10"></el-input>
                    </el-form-item>
                    <!-- <el-form-item label="日期范围：">
                       <el-date-picker
                            v-model="value1"
                            type="daterange"
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                        </el-date-picker>
                    </el-form-item> -->
                    <el-form-item>
                        <el-button type="primary" icon="el-icon-search">搜索</el-button>
                        <el-button type="success" icon="el-icon-circle-plus-outline" @click="addvialog()">新增</el-button>
                    </el-form-item>
                    
                </el-form>
            </div>
            <el-table
                :data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)"
            >
                <el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
                <el-table-column prop="address" label="所属街道"></el-table-column>
                <el-table-column prop="community" label="所属社区"></el-table-column>
                <el-table-column prop="plot" label="所属小区">小区1</el-table-column>
                <el-table-column prop="plot" label="居民姓名">张三</el-table-column>
                <!-- <el-table-column prop="date" label="日期范围"></el-table-column> -->
                <!-- <el-table-column prop="integral" label="可回收垃圾累计积分"></el-table-column> -->
                <!-- <el-table-column prop="score" label="可回收垃圾消费积分"></el-table-column> -->
                <!-- <el-table-column prop="remaining" label="可回收垃圾剩余积分"></el-table-column> -->
                <!-- <el-table-column prop="chuyuintegral" label="厨余收垃圾累计积分"></el-table-column> -->
                <!-- <el-table-column prop="chuyuscore" label="厨余收垃圾消费积分"></el-table-column> -->
                <!-- <el-table-column prop="chuyuremaining" label="厨余收垃圾剩余积分"></el-table-column> -->
                <!-- <el-table-column prop="youhaiintegral" label="有害收垃圾累计积分"></el-table-column> -->
                <!-- <el-table-column prop="youhaiscore" label="有害收垃圾消费积分"></el-table-column> -->
                <!-- <el-table-column prop="youhairemaining" label="有害收垃圾剩余积分"></el-table-column> -->
                <!-- <el-table-column prop="qitaintegral" label="其他收垃圾累计积分"></el-table-column> -->
                <!-- <el-table-column prop="qitascore" label="其他收垃圾消费积分"></el-table-column> -->
                <!-- <el-table-column prop="qitaremaining" label="其他收垃圾剩余积分"></el-table-column> -->
                <el-table-column  label="累计积分">
                    <template scope="scope">
                        <div class="u" @click="getMore(scope.row)">{{ scope.row.totalintegral }}</div>
                    </template>
                </el-table-column>
                <el-table-column  label="消费积分">
                    <template scope="scope">
                        <div class="u" @click="getscoreMore(scope.row)">{{ scope.row.totalscore }}</div>
                    </template>
                </el-table-column>
                <el-table-column prop="totalremaining" label="剩余积分"></el-table-column>
                <!-- <el-table-column label="垃圾分类">
                    <template slot-scope="scope">￥{{scope.row.money}}</template>
                </el-table-column>
                <el-table-column prop="address" label="积分类型"></el-table-column>
                <el-table-column label="状态" align="center">
                    <template slot-scope="scope">
                        <el-tag
                            :type="scope.row.state==='成功'?'success':(scope.row.state==='失败'?'danger':'')"
                        >{{scope.row.state}}</el-tag>
                    </template>
                </el-table-column>

                <el-table-column prop="date" label="分数规则(分)"></el-table-column> -->
                <!-- <el-table-column label="操作" width="180" align="center">
                    <template slot-scope="scope"> -->
                        <!-- <el-button
                            type="text"
                            icon="el-icon-edit"
                            @click="handleEdit(scope.$index, scope.row)"
                        >详情</el-button>| -->
                        <!-- <el-button
                            type="text"
                            @click="detail()" style="color:red"
                        >积分明细</el-button>
                    </template>
                </el-table-column> -->
            </el-table>
            <div class="pagination">
                <el-pagination
                    background
                    layout="total, sizes, prev, pager, next, jumper"
                    :current-page="currentPage"  
                    :page-size="pageSize"
                    :total="tableData.length"
                    @size-change="handleSizeChange"
                    @current-change="handlePageChange"
                ></el-pagination>
            </div>
            <!-- 详情弹出框 -->
              <el-dialog v-dialogDrag title="基础信息" :visible.sync="editVisible" width="50%" >
                <el-form ref="form" :model="form" label-width="70px" class="diaglos display scroll" style="heigh:400px">
                    <el-form-item label="所属街道：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.address" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <el-form-item label="所属社区：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.community" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <el-form-item label="所属小区：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="plot" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <el-form-item label="居民姓名：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="plotname" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <!-- <el-form-item label="日期范围：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.date" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item> -->
                    <el-form-item label="可回收垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.integral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <!-- <el-form-item label="可回收垃圾消费积分：" :label-width="formLabelWidth">
                        <el-input v-model="form.score"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="可回收垃圾剩余积分：" :label-width="formLabelWidth">
                        <el-input v-model="form.remaining"></el-input>
                    </el-form-item> -->
                    <el-form-item label="厨余垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.chuyuintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <!-- <el-form-item label="厨余垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.chuyuscore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="厨余垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.chuyuremaining"></el-input>
                    </el-form-item> -->
                    <el-form-item label="有害垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.youhaiintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <!-- <el-form-item label="有害垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.youhaiscore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="有害垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.youhairemaining"></el-input>
                    </el-form-item> -->
                    <el-form-item label="其他垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.qitaintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>
                    <!-- <el-form-item label="其他垃圾消费积分：" :label-width="formLabelWidth">
                        <el-input v-model="form.qitascore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="其他垃圾剩余积分：" :label-width="formLabelWidth">
                        <el-input v-model="form.qitaremaining"></el-input>
                    </el-form-item> -->
                </el-form>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="editVisible = false">取 消</el-button>
                    <el-button type="primary" @click="saveEdit">确 定</el-button>
                </span>
            </el-dialog>
    

            <!-- 积分明细弹出框 -->
            <el-dialog title="积分明细" :visible.sync="detaildialog" width="30%" >
                <!-- <div class='time-line' style="height:300px;overflow-y: scroll">
	            <div v-for='item in testList' class='time-line-div'>
            		<p>{{item.time}}</p>
            		<p ref='circular'></p>
            		<p>{{item.text}}</p>
	            </div>
	            <div class='img-dotted' ref='dotted'></div>
                </div> -->
                <div class="block scrolly" style="height:300px;">
                    <el-timeline >
                      <el-timeline-item 
                        v-for="(activity,index) in avtives"
                        :key='index'
                        :size='activity.size'
                        :color='activity.color'
                        :timestamp="activity.data" 
                        placement="top"
                        >
                        <el-card style="border:2px solid #cecece">
                          <h4>{{activity.content}}</h4>
                          <p>{{activity.name}} 提交于 {{activity.timestamp}}</p>
                        </el-card>
                      </el-timeline-item>
                      <!-- <el-timeline-item timestamp="2018/4/3" placement="top">
                        
                      </el-timeline-item>
                      <el-timeline-item timestamp="2018/4/2" placement="top">
                        <el-card>
                          <h4>更新 Github 模板</h4>
                          <p>王小虎 提交于 2018/4/2 20:46</p>
                        </el-card>
                      </el-timeline-item>
                      <el-timeline-item timestamp="2018/4/2" placement="top">
                        <el-card>
                          <h4>更新 Github 模板</h4>
                          <p>王小虎 提交于 2018/4/2 20:46</p>
                        </el-card>
                      </el-timeline-item>
                      <el-timeline-item timestamp="2018/4/2" placement="top">
                        <el-card>
                          <h4>更新 Github 模板</h4>
                          <p>王小虎 提交于 2018/4/2 20:46</p>
                        </el-card>
                      </el-timeline-item>
                      <el-timeline-item timestamp="2018/4/2" placement="top">
                        <el-card>
                          <h4>更新 Github 模板</h4>
                          <p>王小虎 提交于 2018/4/2 20:46</p>
                        </el-card>
                      </el-timeline-item>
                      <el-timeline-item timestamp="2018/4/2" placement="top">
                        <el-card>
                          <h4>更新 Github 模板</h4>
                          <p>王小虎 提交于 2018/4/2 20:46</p>
                        </el-card>
                      </el-timeline-item> -->
                    </el-timeline>
                </div>
                 <span slot="footer" class="dialog-footer">
                    <el-button @click="detaildialog = false">取 消</el-button>
                    <!-- <el-button type="primary" @click="saveEdit">确 定</el-button> -->
                </span>
            </el-dialog>
                <!-- 累计积分明细 -->
             <el-dialog v-dialogDrag title="累计积分明细" :visible.sync="getmoredialog" width="50%" >
                 <!-- <ul v-for="item in communitydetaildata" style="height:450px" class="scrolly">
                     <li v-for="items in item.communname" style="border-bottom:1px solid #ccc">
                         <p style="display:flex;padding:10px"><b style="display: inline;">社区名称：</b><span style="display: inline;">{{items.communityname}}</span></p>
                         <p style="display:flex;padding:10px"><b style="display: inline;">居民姓名：</b><span style="display: inline;">{{items.residentsname}}</span></p>
                         <p style="display:flex;padding:10px"><b style="display: inline;">吨数：</b><span style="display: inline;">{{items.communtonnage}}</span></p>
                     </li>
                 </ul> -->
                    <el-table
                        :data="integraldata"
                        height="250"
                        border
                        style="width: 100%">
                        <el-table-column
                          prop="integral"
                          label="可回收垃圾积分"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="chuyuintegral"
                          label="厨余垃圾积分"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="bukeintegral"
                          label="不可回收垃圾积分">
                        </el-table-column>
                        <el-table-column
                          prop="youhaiintegral"
                          label="有害垃圾积分">
                        </el-table-column>
                        <el-table-column
                          prop="qitaintegral"
                          label="其他垃圾积分">
                        </el-table-column>
                    </el-table>
                 <!-- <el-form v-for="item in communitydetaildata">
                    <el-form-item label="社区名称：" :label-width="formLabelWidth" class="wid50">
                        <input prop= class="inputstyle" type="text" disabled="disabled">{{item.name}}</input>
                    </el-form-item>
                 </el-form> -->
                 <!-- <form action="" v-for="item in communitydetaildata">
                    
                 </form> -->
                 <!-- <ul v-for="item in communitydetaildata">
                     <li v-for="items in item.communname">
                         
                         <label for="" label='社区名称：'>{{items.name}}</label>
                         <label for="" label='吨数：'>{{items.communtonnage}}</label>
                         <!-- <p v-for="itemname in items">{{itemname}}</p>
                     </li>
                 </ul> -->
                 <!-- <ul v-for="item in communitydetaildata">
                     <li v-for="items in item">
                         <p></p>
                     </li>
                 </ul> -->
                 
                <!-- <el-form ref="form" :model="form" label-width="70px" class="diaglos display" v-for="item in communitydetaildata">
                    <el-form-item label="社区名称12：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.address" class="inputstyle" type="text" disabled="disabled">{{item}}</input>
                    </el-form-item>
                    <el-form-item label="日期范围：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.date" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item> -->
                    <!-- <el-form-item label="可回收垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.integral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item> -->
                    <!-- <el-form-item label="可回收垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.score"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="可回收垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.remaining"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="厨余垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.chuyuintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item> -->
                    <!-- <el-form-item label="厨余垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.chuyuscore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="厨余垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.chuyuremaining"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="有害垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.youhaiintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>  -->
                    <!-- <el-form-item label="有害垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.youhaiscore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="有害垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.youhairemaining"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="其他垃圾累计积分：" :label-width="formLabelWidth" class="wid50">
                        <input v-model="form.qitaintegral" class="inputstyle" type="text" disabled="disabled"></input>
                    </el-form-item>  -->
                    <!-- <el-form-item label="其他垃圾消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.qitascore"></el-input>
                    </el-form-item> -->
                    <!-- <el-form-item label="其他垃圾剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="form.qitaremaining"></el-input>
                    </el-form-item> -->
                <!-- </el-form> -->
                <!-- <span slot="footer" class="dialog-footer">
                    <el-button @click="getmoredialog = false">取 消</el-button>
                    <el-button type="primary" @click="saveEdit">确 定</el-button>
                </span> -->
            </el-dialog>
            <!-- 消费积分明细 -->
             <el-dialog v-dialogDrag title="消费积分明细" :visible.sync="getscoremoredialog" width="50%" >
                 <!-- <ul v-for="item in communitydetaildata" style="height:450px" class="scrolly">
                     <li v-for="items in item.communname" style="border-bottom:1px solid #ccc">
                         <p style="display:flex;padding:10px"><b style="display: inline;">居民姓名：</b><span style="display: inline;">{{items.residentsname}}</span></p>
                         <p style="display:flex;padding:10px"><b style="display: inline;">吨数：</b><span style="display: inline;">{{items.communtonnage}}</span></p>
                     </li>
                 </ul> -->
                 <el-table
                        :data="xfintegraldata"
                        height="250"
                        border
                        style="width: 100%">
                        <el-table-column
                          prop="exchange"
                          label="兑换物品"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="exchangenumber"
                          label="兑换个数">
                        </el-table-column>
                        <el-table-column
                          prop="exchangeintegral"
                          label="兑换积分"
                          width="180">
                        </el-table-column>
                        
                        <!-- <el-table-column
                          prop="youhaiintegral"
                          label="有害垃圾积分">
                        </el-table-column>
                        <el-table-column
                          prop="qitaintegral"
                          label="其他垃圾积分">
                        </el-table-column> -->
                    </el-table>
            </el-dialog>
            <!-- 新增弹出框 -->
             <el-dialog v-dialogDrag title="新增" :visible.sync="adddatevialog" width="50%" >
                 <el-form ref="addform" :model="addform" label-width="70px" class="diaglos display">
                    <el-form-item label="居民名称：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="addform.address" ></el-input>
                    </el-form-item>
                    <el-form-item label="居民累计积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="addform.totalintegral"></el-input>
                    </el-form-item>
                    <el-form-item label="居民消费积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="addform.totalscore"></el-input>
                    </el-form-item>
                    <el-form-item label="居民剩余积分：" :label-width="formLabelWidth" class="wid50">
                        <el-input v-model="addform.totalremaining"></el-input>
                    </el-form-item> 
                </el-form>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="adddatevialog = false">取 消</el-button>
                    <el-button type="primary" @click="saveEditvialog">确 定</el-button>
                </span>
            </el-dialog>
        </div>
</template>
<script>
import '../../../assets/css/common.css'

export default {
    data(){
        return{
            avtives: [{
                content: '厨余垃圾212斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                size: 'large',
                name: '张茜',
                data: '2018-04-03'
            },{
                content: '厨余垃圾212斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                name: '张茜',
                data: '2018-04-03'
            },{
                content: '厨余垃圾212斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                name: '张茜',
                data: '2018-04-03'
            },{
                content: '其他垃圾21斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                name: '张茜',
                data: '2018-04-03'
            },{
                content: '厨余垃圾212斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                name: '张茜',
                data: '2018-04-03'
            },{
                content: '有害垃圾22斤',
                timestamp: '2018-04-03 20:46',
                color: '#0bbd87',
                name: '张茜',
                data: '2018-04-03'
            },],
            integraldata:[{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            },{
                integral: '120',
                chuyuintegral: '80',
                youhaiintegral: '130',
                qitaintegral: '170',
                bukeintegral: '100'
            }],
            xfintegraldata:[{
                exchange:'香皂',
                exchangenumber: 2,
                exchangeintegral: '40'
            },{
                exchange:'水杯',
                exchangenumber: 1,
                exchangeintegral: '40'
            },{
                exchange:'洗衣粉',
                exchangenumber: 1,
                exchangeintegral: '80'
            },{
                exchange:'魔力擦',
                exchangenumber: 2,
                exchangeintegral: '50'
            },{
                exchange:'扫把',
                exchangenumber: 1,
                exchangeintegral: '140'
            },{
                exchange:'锅铲',
                exchangenumber: 1,
                exchangeintegral: '80'
            },{
                exchange:'数据线',
                exchangenumber: 1,
                exchangeintegral: '260'
            }],
            // testList:[
			// 	{key:'1',time:'2001-01-01 01:00:00',text:'第一步第一步第一步第一步第一步'},
			// 	{key:'2',time:'2002-02-02 02:00:00',text:'第二步第二步第二步第二步第二步'},
			// 	{key:'3',time:'2003-03-03 03:00:00',text:'第三步第三步第三步第三步第三步'},
			// 	{key:'4',time:'2004-04-04 04:00:00',text:'第四步第四步第四步第四步第四步'},
            //     {key:'5',time:'2005-05-05 05:00:00',text:'第五步第五步第五步第五步第五步'},
            //     {key:'6',time:'2005-05-05 05:00:00',text:'第五步第五步第五步第五步第五步'},
            //     {key:'7',time:'2005-05-05 05:00:00',text:'第五步第五步第五步第五步第五步'},
            //     {key:'8',time:'2005-05-05 05:00:00',text:'第五步第五步第五步第五步第五步'}
			// ],
              currentPage:1, //初始页
                pagesize:10,    //    每页的数据
                userList: [],
                address:'',
                name:'',
                value1: '',
                formLabelWidth: '160px',
                plot:'小区2',
                plotname: '张三',
            tableData: [{
                id: '1',
                address: "街道1",
                community: '社区1',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '2',
                address: "街道2",
                community: '社区2',
                date: '2020-7-1~2020-7-20',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '3',
                address: "街道3",
                community: '社区3',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '4',
                address: "街道4",
                community: '社区4',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '5',
                address: "街道5",
                community: '社区5',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '6',
                address: "街道6",
                community: '社区6',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '7',
                address: "街道7",
                community: '社区7',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '8',
                address: "街道8",
                community: '社区8',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '9',
                address: "街道9",
                community: '社区9',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '10',
                address: "街道10",
                community: '社区10',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '11',
                address: "街道11",
                community: '社区11',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            },{
                id: '12',
                address: "街道12",
                community: '社区12',
                date: '2020-7-1~2020-7-30',
                integral: '100',
                score: '2',
                remaining:'98',
                chuyuintegral: '200',
                chuyuscore: '1',
                chuyuremaining: '199',
                youhaiintegral: '100',
                youhaiscore:　'2',
                youhairemaining:　'98',
                qitaintegral: '100',
                qitascore: '5',
                qitaremaining: '95',
                totalintegral: '500',
                totalscore: '690',
                totalremaining: '142'
            }],
            multipleSelection: [],
            delList: [],
            editVisible: false,
            pageTotal: 0,
            form: {},
            idx: -1,
            id: -1,
            options:[],
            villageno: '',
            detaildialog:false,
            adddatevialog:false,
             communitydetail:[{
                index:'1',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communityname:'丽华里社区',
                    communtonnage: '80',
                    residentsname:'张倩',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]
            },{
                index:'2',
               communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]              
            },{
                index:'3',
               communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]            
            },{
                index:'4',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]               
            },{
                index:'5',
               communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]              
            },{
                index:'6',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]               
            },{
                index: '7',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]               
            },{
                index:'8',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]                
            },{
                index:'9',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]                
            },{
                index:'10',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]                
            },{
                index:'11',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]               
            },{
                index:'12',
                communname:[{
                    streename: '华苑街道',
                    plotname:'丽华里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '梅苑街道',
                    plotname:'科信里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },{
                    streename: '美元街道',
                    plotname:'荻花里',
                    communtonnage: '80',
                    residentsname:'张倩',
                    communityname:'丽华里社区',
                },]                
            }],
            communitydetaildata:'',
            getmoredialog:false,
            getscoremoredialog:false,
            addform:{
                address:'',
                totalintegral:'',
                totalscore:'',
                totalremaining:''
            },
        }
    },
    created() {
        // this.getData();
        this.loadCheckbox_SCV()
    },
    methods: {
        async saveEditvialog(){
            this.adddatevialog = false
        },
        //新增弹出框
        async addvialog(){
            this.adddatevialog = true
        },
        //累计积分弹框
        async getMore(row){
            this.communitydetaildata =this.communitydetail.filter((item,index)=>{
                if(row.id == item.index){
                    console.log(item)
                   return item.communname
                }
                this.streetname == item.address
            })
            this.getmoredialog = true
            console.log(row);
        },
         //消费积分弹框
        async getscoreMore(row){
            this.communitydetaildata =this.communitydetail.filter((item,index)=>{
                if(row.id == item.index){
                    console.log(item)
                   return item.communname
                }
            })
            this.getscoremoredialog = true
            console.log(row);
        },
        async loadCheckbox_SCV () {
            var url =this.$url+'/GetGroupsApi?ClientNo='+localStorage.getItem('clentno');
            const { data } = await this.$axios.get(url)
            this.options = data.filter(item => {
              return item
        })
        },
        async detail(){
            this.detaildialog = true;
        },
        // 获取 easy-mock 的模拟数据
        // getData() {
        //     fetchData(this.query).then(res => {
        //         console.log(res);
        //         this.tableData = res.list;
        //         this.pageTotal = res.pageTotal || 50;
        //     });
        // },
        // 触发搜索按钮
        // handleSearch() {
        //     this.$set(this.query, 'pageIndex', 1);
        //     // this.getData();
        // },
         mohu() {
            var search = this.name;
            console.log(search)
            var newdate = [];
            if(search){
                if(search)
                 this.tableData.filter(item=>{
                    if(item.name.indexOf(search) != -1){
                        newdate.push(item)
                    }
                })
            }else if (search == ''){
                console.log(this.tableData)
            }
            this.tableData = newdate
        },
        // 编辑操作
        handleEdit(index, row) {
            this.idx = index;
            this.form = row;
            this.editVisible = true;
        },
        // 保存编辑
        saveEdit() {
            this.editVisible = false;
            this.$message.success(`修改第 ${this.idx + 1} 行成功`);
            this.$set(this.tableData, this.idx, this.form);
        },
        // 分页导航
        handlePageChange(currentPage) {
            this.currentPage = currentPage;
            console.log(this.currentPage)
            // this.$set(this.query, 'pageIndex', val);
            // this.getData();
        },
        handleSizeChange(size){
            this.pagesize = size;
            console.log(this.pagesize)
        }
    },
    mounted(){
        this.$refs.dotted.style.left = this.$refs.circular[0].offsetLeft - 12 + 'px'
    }
}
</script>
<style scoped>
.text-center{
	text-align: center;
}
.time h2{
	color:#FF6600;
	margin: 20px auto 30px auto;
}
.time-line{
	position: relative;
	width:100%;
	margin:0 auto;
}
.time-line-div{
	position:relative;
	min-height:100px;
}
.time-line-div>p:nth-child(1){
	position: absolute;
	left:0;
	width:80px;
    text-align: center;
}
.time-line-div>p:nth-child(2){
	position:absolute;
	left:85px;
	width:15px;
	height:15px;
	top:15px;
	background:#5CB85C;
	border-radius: 50%;
	z-index: 10
}
.time-line-div>p:nth-child(3){
	position:absolute;
	left: 130px;
	padding: 10px;
	background: #317EF3;
	font-size:.8rem;
	color:#fff;
	border-radius: 10px;
}
.img-dotted{
	position:absolute;
	width:20px;
	height:2000px;
    top:0;
    left: 73px;
	z-index: 1;
    background:url('../../../assets/img/dotted.png');
    
}
</style>